<?php

/**
 * This is the model class for table "hargaeceranpadipalawija".
 *
 * The followings are the available columns in table 'hargaeceranpadipalawija':
 * @property integer $hepp_id
 * @property integer $hepp_bulan
 * @property integer $hepp_ir64
 * @property integer $hepp_cisadane
 * @property integer $hepp_tepungterigu
 * @property integer $hepp_ketelarambat
 * @property integer $hepp_tahun
 */
class Hargaeceranpadipalawija extends CActiveRecord
{
	/**
	 * Returns the static model of the specified AR class.
	 * @return Hargaeceranpadipalawija the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'hargaeceranpadipalawija';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('hepp_bulan, hepp_ir64, hepp_cisadane, hepp_tepungterigu, hepp_ketelarambat, hepp_tahun', 'numerical', 'integerOnly'=>true),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('hepp_id, hepp_bulan, hepp_ir64, hepp_cisadane, hepp_tepungterigu, hepp_ketelarambat, hepp_tahun', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'hepp_id' => 'Hepp',
			'hepp_bulan' => 'Hepp Bulan',
			'hepp_ir64' => 'Hepp Ir64',
			'hepp_cisadane' => 'Hepp Cisadane',
			'hepp_tepungterigu' => 'Hepp Tepungterigu',
			'hepp_ketelarambat' => 'Hepp Ketelarambat',
			'hepp_tahun' => 'Hepp Tahun',
		);
	}

	/**
	 * Retrieves a list of models based on the current search/filter conditions.
	 * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
	 */
	public function search()
	{
		// Warning: Please modify the following code to remove attributes that
		// should not be searched.

		$criteria=new CDbCriteria;

		$criteria->compare('hepp_id',$this->hepp_id);
		$criteria->compare('hepp_bulan',$this->hepp_bulan);
		$criteria->compare('hepp_ir64',$this->hepp_ir64);
		$criteria->compare('hepp_cisadane',$this->hepp_cisadane);
		$criteria->compare('hepp_tepungterigu',$this->hepp_tepungterigu);
		$criteria->compare('hepp_ketelarambat',$this->hepp_ketelarambat);
		$criteria->compare('hepp_tahun',$this->hepp_tahun);

		return new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
		));
	}
}